package com.netx.generics.util;
import com.netx.generics.translation.Token;

class BuiltinToken extends Token {

	public static final int TEXT = 100;
	public static final int FUNCTION = 101;

	private static String[] _names = new String[] {"TEXT", "FUNCTION"};

	public BuiltinToken(int type, int lineNum, int beginIndex, int endIndex, String source) {
		super(type, lineNum, beginIndex, endIndex, source);
	}
	
	public String getTypeAsString() {
		if(getType() < TEXT) {
			return super.getTypeAsString();
		}
		else {
			return _names[getType()-TEXT];
		}
	}
}
